package c.d.a.a.e;

import c.d.a.a.c.l;
import c.d.a.a.j.d;
import c.d.a.a.j.g;
import com.github.mikephil.charting.charts.RadarChart;
import com.github.mikephil.charting.data.Entry;
import java.util.List;
import java.util.Objects;

/* compiled from: RadarHighlighter */
public class f extends e<RadarChart> {
    public f(RadarChart radarChart) {
        super(radarChart);
    }

    public b b(int i, float f, float f2) {
        int i2 = i;
        this.b.clear();
        Objects.requireNonNull(((RadarChart) this.a).getAnimator());
        Objects.requireNonNull(((RadarChart) this.a).getAnimator());
        float sliceAngle = ((RadarChart) this.a).getSliceAngle();
        float factor = ((RadarChart) this.a).getFactor();
        d b = d.b(0.0f, 0.0f);
        for (int i3 = 0; i3 < ((l) ((RadarChart) this.a).getData()).d(); i3++) {
            c.d.a.a.f.b.d c = ((l) ((RadarChart) this.a).getData()).c(i3);
            Entry q0 = c.q0(i2);
            float f3 = (float) i2;
            g.f(((RadarChart) this.a).getCenterOffsets(), ((q0.a() - ((RadarChart) this.a).getYChartMin()) * factor) * 1.0f, ((RadarChart) this.a).getRotationAngle() + ((sliceAngle * f3) * 1.0f), b);
            this.b.add(new b(f3, q0.a(), b.b, b.c, i3, c.e0()));
        }
        List list = this.b;
        sliceAngle = ((RadarChart) this.a).n(f, f2) / ((RadarChart) this.a).getFactor();
        b bVar = null;
        float f4 = Float.MAX_VALUE;
        for (int i4 = 0; i4 < list.size(); i4++) {
            b bVar2 = (b) list.get(i4);
            float abs = Math.abs(bVar2.b - sliceAngle);
            if (abs < f4) {
                bVar = bVar2;
                f4 = abs;
            }
        }
        return bVar;
    }
}
